/*
 * XML Type:  PresentmentAccountInfo
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PresentmentAccountInfo
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PresentmentAccountInfo(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PresentmentAccountInfoImpl extends net.ofx.types.x2003.x04.impl.AbstractAccountInfoImpl implements net.ofx.types.x2003.x04.PresentmentAccountInfo
{
    
    public PresentmentAccountInfoImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PRESACCTFROM$0 = 
        new javax.xml.namespace.QName("", "PRESACCTFROM");
    private static final javax.xml.namespace.QName SVCSTATUS$2 = 
        new javax.xml.namespace.QName("", "SVCSTATUS");
    private static final javax.xml.namespace.QName REASON$4 = 
        new javax.xml.namespace.QName("", "REASON");
    
    
    /**
     * Gets the "PRESACCTFROM" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount getPRESACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "PRESACCTFROM" element
     */
    public void setPRESACCTFROM(net.ofx.types.x2003.x04.PresentmentAccount presacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTFROM$0);
            }
            target.set(presacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "PRESACCTFROM" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount addNewPRESACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Gets the "SVCSTATUS" element
     */
    public net.ofx.types.x2003.x04.ServiceStatus2Enum.Enum getSVCSTATUS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SVCSTATUS$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.ServiceStatus2Enum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SVCSTATUS" element
     */
    public net.ofx.types.x2003.x04.ServiceStatus2Enum xgetSVCSTATUS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServiceStatus2Enum target = null;
            target = (net.ofx.types.x2003.x04.ServiceStatus2Enum)get_store().find_element_user(SVCSTATUS$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SVCSTATUS" element
     */
    public void setSVCSTATUS(net.ofx.types.x2003.x04.ServiceStatus2Enum.Enum svcstatus)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SVCSTATUS$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SVCSTATUS$2);
            }
            target.setEnumValue(svcstatus);
        }
    }
    
    /**
     * Sets (as xml) the "SVCSTATUS" element
     */
    public void xsetSVCSTATUS(net.ofx.types.x2003.x04.ServiceStatus2Enum svcstatus)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServiceStatus2Enum target = null;
            target = (net.ofx.types.x2003.x04.ServiceStatus2Enum)get_store().find_element_user(SVCSTATUS$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ServiceStatus2Enum)get_store().add_element_user(SVCSTATUS$2);
            }
            target.set(svcstatus);
        }
    }
    
    /**
     * Gets the "REASON" element
     */
    public java.lang.String getREASON()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REASON$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "REASON" element
     */
    public net.ofx.types.x2003.x04.MessageType xgetREASON()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(REASON$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "REASON" element
     */
    public boolean isSetREASON()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REASON$4) != 0;
        }
    }
    
    /**
     * Sets the "REASON" element
     */
    public void setREASON(java.lang.String reason)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REASON$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REASON$4);
            }
            target.setStringValue(reason);
        }
    }
    
    /**
     * Sets (as xml) the "REASON" element
     */
    public void xsetREASON(net.ofx.types.x2003.x04.MessageType reason)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(REASON$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.MessageType)get_store().add_element_user(REASON$4);
            }
            target.set(reason);
        }
    }
    
    /**
     * Unsets the "REASON" element
     */
    public void unsetREASON()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REASON$4, 0);
        }
    }
}
